/*    */ package com.lmpop.trade.crontab;
/*    */ 
/*    */ import com.lmpop.frame.QueryList;
/*    */ import com.lmpop.trade.tb_assign.Tb_assignInfo;
/*    */ import com.lmpop.updateHtml.parseHtml.UpdateHtml;
/*    */ import java.util.Hashtable;
/*    */ import java.util.Iterator;
/*    */ import java.util.List;
/*    */ 
/*    */ public class CronTimer
/*    */ {
/*  9 */   QueryList queryList = new QueryList();
/* 10 */   UpdateHtml update = new UpdateHtml();
/*    */ 
/*    */   public void updateHtmlByTime()
/*    */   {
/* 14 */     Tb_assignInfo assignInfo = new Tb_assignInfo();
/* 15 */     List asList = assignInfo.getAllAssign();
/* 16 */     if ((asList != null) && (asList.size() > 0))
/*    */     {
/* 18 */       StringBuffer idBuffer = new StringBuffer();
/* 19 */       for (Iterator it = asList.iterator(); it.hasNext(); )
/*    */       {
/* 21 */         Hashtable asMap = (Hashtable)it.next();
/* 22 */         String info_id = ""; String info_type = ""; String article_temp = ""; String save_dir = "";
/* 23 */         if (asMap.get("info_id") != null)
/*    */         {
/* 25 */           info_id = asMap.get("info_id").toString();
/* 26 */           idBuffer.append(info_id + "|");
/*    */         }
/* 28 */         if (asMap.get("info_type") != null) info_type = asMap.get("info_type").toString();
/* 29 */         if (asMap.get("article_temp") != null) article_temp = asMap.get("article_temp").toString();
/* 30 */         if (asMap.get("save_dir") != null) save_dir = asMap.get("save_dir").toString();
/* 31 */         Hashtable pMap = new Hashtable();
/* 32 */         pMap.put("info_id", info_id);
/* 33 */         this.update.updateArticle(info_type, article_temp, save_dir, pMap);
/*    */       }
/* 35 */       if (!idBuffer.toString().equals(""))
/*    */       {
/* 37 */         String[] infoids = idBuffer.toString().split("\\|");
/* 38 */         for (int i = 0; i < infoids.length; i++)
/*    */         {
/* 40 */           this.queryList.executeSql("deleteTb_assign", infoids[i]);
/*    */         }
/*    */       }
/*    */     }
/*    */   }
/*    */ 
/*    */   public static void main(String[] args)
/*    */   {
/* 50 */     CronTimer cronTimer = new CronTimer();
/* 51 */     cronTimer.updateHtmlByTime();
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.crontab.CronTimer
 * JD-Core Version:    0.6.0
 */